package cn.tedu.springboot.security.ex;


import cn.tedu.springboot.security.web.ServiceCode;

/**
 * @author BJ
 * @version 0.0.1
 * @date 2022/9/27 10:07
 * 业务异常
 */
public class ServiceException extends RuntimeException {

    private ServiceCode serviceCode;

    //将状态码和消息组合在一起
    public ServiceException(ServiceCode serviceCode,String message) {
        super(message);
        this.serviceCode = serviceCode;
    }

    public ServiceCode getServiceCode() {
        return serviceCode;
    }
}
